#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2018/12/4 23:53
# @Author  : lizhen
# @Site    : 
# @File    : coins.py
# @Software: PyCharm


def print_min_num_info(l, desc):
    _list_desc = []
    for i in range(desc // l[0] + 1):
        for j in range(desc // l[1] + 1):
            for k in range(desc // l[2] + 1):
                if i * l[0] + j * l[1] + k * l[2] == desc:
                    _dict = {l[0]: i, l[1]: j, l[2]: k, 'sum': i + j + k}
                    _list_desc.append(_dict)

    _min_num = _list_desc[0]['sum']
    for _item in _list_desc[1:]:
        if _min_num > _item['sum']:
            _min_num = _item['sum']

    _list_min_num = []
    for _item in _list_desc:
        if _item['sum'] == _min_num:
            _list_min_num.append(_item)
    print(_list_min_num)


def main():
    coins = [1, 2, 5]
    money = int(input("请输入计算的总和："))
    print_min_num_info(coins, money)


if __name__ == '__main__':
    main()
